package nl.boelen.game.graphics;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import javax.imageio.ImageIO;

public class CustomImage {

    private BufferedImage customImg;
    public CustomImage(String path) {
        try {
            URL url = this.getClass().getResource(path);
            File file = new File(url.toURI());
            customImg = ImageIO.read(file);
        } catch (IOException ex) {
            ex.printStackTrace();
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }
    }

    public BufferedImage getImage() {
        return customImg;
    }
}
